<%-- 
    Document   : manager
    Created on : 2020-5-19, 11:05:44
    Author     : Lenovo
--%>

<%@page import="com.qdu.entity.Activity"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="javax.script.ScriptEngineManager"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.qdu.entity.Log"%>
<%@page import="com.qdu.entity.Log"%>
<%@page import="java.util.List"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>    
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
        <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
        <style type="text/css">
            .bg:hover{
                background-color: #23527c;
            }
        </style>
        <script>
            $(document).ready(function(){
                $("#logmore").click(function(){
                    $.ajax({
                        url:"searchalllogs",
                        type:GET,
                        success:function(data){
                            $("#main").html(data);
                        },
                        error:function(req,status,error){
                            alert("请求错误，错误信息为:"+error);
                        }
                    });
                });
                
//                $("#activitymore").click(function(){
//                    $.ajax({
//                        url:"",
//                        type:GET,
//                        success:function(data){
//                            $("#main").html(data);
//                        },
//                        error:function(req,status,error){
//                            alert("请求错误，错误信息为:"+error);
//                        }
//                    });
//                });
//                
//                $("#usermore").click(function(){
//                    $.ajax({
//                        url:"",
//                        type:GET,
//                        success:function(data){
//                            $("#main").html(data);
//                        },
//                        error:function(req,status,error){
//                            alert("请求错误，错误信息为:"+error);
//                        }
//                    });
//                });
            });
        </script>
        <title>管理员</title>
    </head>
    
    <body>
        
        <div style="height: 100px; border-bottom: scrollbar thin solid" id="top">
            <div style="width: 200px">
                <p class="text-info" style="font-size: 40px;font-family: cursive;font-weight: bolder;color: #204d74;">&nbsp&nbsp&nbsp管理员</p>

            </div>

            <!--查询，将表单提交给servlet处理，用于在这个页面显示查询的内容  action=""是要提交到的servlet路径-->
            <div style="margin-left: 930px; width:300px">
                <form action="keyword" class="form-inline">
                    <label for="in" style="margin-right: 50px">
                        <input placeholder="请输入关键字" name="keyword" style="width: 190px">
                        <button class="btn btn-xs glyphicon glyphicon-search bg-primary"></button>
                        <a href="ems"><span class="glyphicon glyphicon-user" style="font-size: 20px; left: 8px"></span></a>
                    </label>
                </form>
            </div>
            <hr>
        </div>

        <!--左边的菜单栏-->
        <div role="navigation" id="left" style="width: 180px; height: 500px; margin-top: 20px; position: absolute" class="bg-primary">
            <!--用户菜单栏-->
            <a href="saus">

                <div class="bg" id="usermore" style=" height: 120px">
                    <p style="text-align: center; font-family: 宋体; font-size: 20px;color: #fff">
                        <br><span class="glyphicon glyphicon-hand-right"></span>
                        正式用户
                    </p>
                </div>
            </a>

            <!--活动菜单栏-->
            <a href="ManagerActiv">
                <div class="bg" id="activitymore" style=" height: 120px">
                    <p style="text-align: center; font-family: 宋体; font-size: 20px;color: #fff">
                        <br>
                        <span class="glyphicon glyphicon-hand-right"></span>
                        活动
                    </p>
                </div>
            </a>

            <!--日志菜单栏-->
            <a href="searchalllogs">
                <div class="bg" id="logmore" style=" height: 120px">
                    <p style="text-align: center; font-family: 宋体; font-size: 20px;color: #fff">
                        <br><span class="glyphicon glyphicon-hand-right"></span>
                        日志
                    </p>
                </div>
            </a>
        </div>
        
        <!--用户审核表-->
        <a href="snpus">

                <div class="bg" id="usermore" style=" width: 180px;height: 120px;position: absolute;top: 480px">
                    <p style="text-align: center; font-family: 宋体; font-size: 20px;color: #fff">
                        <br><span class="glyphicon glyphicon-hand-right"></span>
                        用户审核
                    </p>
                </div>
        </a>

        <!--右边的区域-->
        <div id="main"  style="width: 1083px; height: auto; margin-left: 180px;margin-top: 20px;background-color:#f5f5f5" >

            <div id="middleUser" style="height: 130px">
                <!--点击单个的用户在新的页面显示该用户的详细信息，但是点击查看更多就是在这个页面查看表格
                点击单个用户只能删除用户信息，但是查看全部用户可以通过审核-->
                    <c:forEach  items="${requestScope.userList}" var="user" begin="0" end="2">
                        <div id="someUser" style="width: 230px;height: 110px; margin-left: 100px; float:left; top: 320px;margin-top: 10px;border: #8c8c8c outset medium;">
                            <image src="images/pic3.jpg" style="float:left;" height="105px" alt="" style="position: relative"/>
                            <div class="copy"><p style="font-size: 15px">${user.getUname()}<br>
                            用户名：${user.getUname()}<br>
                            性别：${user.getUgender()}<br>
                            等级：${user.getUlevel()}</p></div>
                        </div>
                </c:forEach>
                        <div style="position: absolute ;right:10px;top:220px">
                            <a href="saus" id="usermore">查看更多>></a>
                        </div>
                    </div>
            <hr style="background-color:#8c8c8c;height: 1px">

            <%
            List<Activity> alist=(List<Activity>)request.getAttribute("managerlist");
            pageContext.setAttribute("alist",alist);
            %>
            <!-------------------------------------活动------------------------------>
            <div id="middleActivity"  style="height: 130px;margin-top: 10px">
                <!--活动1-->
                <c:forEach  items="${pageScope.alist}" var="alist" begin="0" end="2">
                <a href="gmis?activityId=${alist.activityId}">
                    <div id="someUser" style="width: 230px;height: 110px; margin-left: 100px; float:left; top: 320px;border: #8c8c8c outset medium">
                        <image src="images/${alist.activityId}.jpg" style="float:left;" height="105px" alt="" style="position: relative"/>
                        <div class="copy"><p style="font-size: 15px">${alist.aname}<br>
                        进度：${alist.astatus}<br>
                        需要${alist.anumber}人<br>
                        ${alist.astartTime}到达</p></div>
                    </div>
                </a>
                </c:forEach>
                <div style="position: absolute ;right:10px;top:420px">
                    <a href="ManagerActiv" id="activitymore">管理更多页面>></a>
                </div>
            </div>
            <hr style="background-color:#8c8c8c;height: 1px">

            <!--日志-->
            <div id="middleActivity"  style="height: 150px">
                <!--日志1-->
                <div id="someLog" style=" width: 230px;height: 110px; margin-left:110px;">
                </div>
                <c:forEach items="${requestScope.logList}" var="i" begin="0" end="2">
                    <a href="msols?id=${i.getId()}">
                        <div id="someUser" style="width: 230px;height: 110px; margin-left: 100px; float:left;margin-top: -90px;border: #8c8c8c outset medium">
                            <image src="images/${i.getImag()}" style="float:left;" height="105px" width="115px" alt="" style="position: relative"/>
                            <div class="copy"><p style="font-size: 15px">${i.getName()}<br>
                            活动编号：${i.getActivityId()}<br>
                            用户编号:${i.getUserid()}<br></div>
                        </div>
                    </a>
                </c:forEach>

<!--                日志2
                <a href="msols?id=#?name=#">
                    <div id="someUser" class="bg-success" style=" width: 230px;height: 110px; margin-left: 410px;margin-top: -110px">
                        <image src="back.jpg" alt="" style="position: relative"/>
                        <p style="font-size: 15px"><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日志名称</p>
                    </div>
                </a>

                日志3
                <a href="msols?id=#?name=#">
                    <div id="someUser" class="bg-success" style=" width: 230px;height: 110px; margin-left: 710px;margin-top: -110px">
                        <image src="#" alt="" style="position: relative"/>
                        <p style="font-size: 15px"><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日志名称</p>
                    </div>
                </a>-->

                <div style="position: absolute ;right:10px;top:600px">
                    <a href="searchalllogs" id="logmore">查看更多>></a>
                </div>
            </div>
        </div>
    </body>
</html>
